package com.itheima.test2;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;

public class Test {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>(List.of("张三丰", "王思聪", "张飞", "刘晓敏", "张靓颖"));
        Stream<String> stream = list.stream().filter(s -> s.startsWith("张"));
        stream.forEach(s -> System.out.println(s));
    }
}
